package vcproj2cmake;

import java.util.ArrayList;

public class Configuration {
	public String name;
	public String target;
	public int ConfigurationType;
	
	public String outputDir;
	public String intermediateDirectory;
	public String preBuildEvent;
	public String postBuildEvent;
	
	public String AdditionalIncludeDirectories;
	public String PreprocessorDefinitions;
	public boolean MinimalRebuild;
	public int BasicRuntimeChecks;
	public int RuntimeLibrary;
	public int WarningLevel;
	public int DebugInformationFormat;
	public String DisableSpecificWarnings;
	
	public String AdditionalDependencies;
	public int LinkIncremental;
	public String AdditionalLibraryDirectories;
	public boolean GenerateDebugInformation;
	
	public static String normalizeEscapeSeq(String str){
		if (str != null)
			str = str.replace("\\", "/");
		return str;
	}
	public static String normalizeSplitter(String str) {
		if (str != null)
			str = str.replace(";", " ");
		return str;
	}
	public void normalize() {
		outputDir=normalizeEscapeSeq(outputDir);
		intermediateDirectory=normalizeEscapeSeq(intermediateDirectory);
		preBuildEvent=normalizeEscapeSeq(preBuildEvent);
		postBuildEvent=normalizeEscapeSeq(postBuildEvent);
		AdditionalDependencies=normalizeEscapeSeq(AdditionalDependencies);
		AdditionalIncludeDirectories=normalizeEscapeSeq(AdditionalIncludeDirectories);
		AdditionalLibraryDirectories=normalizeEscapeSeq(AdditionalLibraryDirectories);
		
		AdditionalIncludeDirectories=normalizeSplitter(AdditionalIncludeDirectories);
		AdditionalDependencies=normalizeSplitter(AdditionalDependencies);
		AdditionalLibraryDirectories=normalizeSplitter(AdditionalLibraryDirectories);
	}
	
}